home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / sticpsrc.lzh / SOURCE.ARC / TELNET.H < prev    next >
C/C++ Source or Header  |  1988-02-16  |  1KB  |  40 lines

  1. #define    LINESIZE    256    /* Length of local editing buffer */
  2.  
  3.  
  4. /* Telnet command characters */
  5. #define    IAC        255    /* Interpret as command */
  6. #define    WILL        251
  7. #define    WONT        252
  8. #define    DO        253
  9. #define    DONT        254
  10.  
  11. /* Telnet options */
  12. #define    TN_TRANSMIT_BINARY    0
  13. #define    TN_ECHO            1
  14. #define    TN_SUPPRESS_GA        3
  15. #define    TN_STATUS        5
  16. #define    TN_TIMING_MARK        6
  17. #define    NOPTIONS        6
  18.  
  19. /* Telnet protocol control block */
  20. struct telnet {
  21.     struct tcb *tcb;
  22.     char state;
  23.  
  24. #define    TS_DATA    0    /* Normal data state */
  25. #define    TS_IAC    1    /* Received IAC */
  26. #define    TS_WILL    2    /* Received IAC-WILL */
  27. #define    TS_WONT    3    /* Received IAC-WONT */
  28. #define    TS_DO    4    /* Received IAC-DO */
  29. #define    TS_DONT    5    /* Received IAC-DONT */
  30.  
  31.     char local[NOPTIONS];    /* Local option settings */
  32.     char remote[NOPTIONS];    /* Remote option settings */
  33.  
  34.     struct session *session;    /* Pointer to session structure */
  35. };
  36. #define    NULLTN    (struct telnet *)0
  37. extern int refuse_echo;
  38. struct telnet *open_telnet();
  39. int send_tel(),tel_input();
  40.